import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'
import a1 from '@/demo/a1'
import a2 from '@/demo/a2'
import a3 from '@/demo/a3'
import newpage1 from '@/demo/newpage1'
import svgpage from '@/demo/svgdrag'


//  组件内容
import subjectmain from '@/assembly/subject/subjectmain'
import lunbo from '@/assembly/subject/subjectmain'
import vuedraggable from '@/demo/vuedraggable'
import paging from '@/demo/paging'

// 上传组件
import uploadview from '@/demo/upload/upload'
import Atlas from '@/demo/upload/Atlas'
import Media from '@/demo/upload/Media'

//  纯组件模板
import assembly from '@/views/assembly/assembly/assembly'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: index,
      children:[
        {
          path: '/a1',
          name: 'a1',
          component: a1,
          default:true
        },
        {
          path: '/a2',
          name: 'a2',
          component: a2
        },
        {
          path: '/a3',
          name: 'a3',
          component: a3
        },
        {
          path: '/svgpage',
          name: 'svgpage',
          component: svgpage
        },
        {
          path: '/subjectmain',
          name: 'subjectmain',
          component: subjectmain
        },
        {
          path: '/uploadview',
          name: 'uploadview',
          component: uploadview,
          // default:true,
          children:[
            {          
              path: '/uploadview/Atlas',
              name: 'Atlas',
              component: Atlas,
              // default:true
            },
            {          
              path: '/uploadview/Media',
              name: 'Media',
              component: Media,
            },
          ]
        },    {
          path: '/assembly',
          name: 'assembly',
          component: assembly
        },
      ]
    },
    {
      path: '/newpage1',
      name: 'newpage1',
      component: newpage1,
      children:[
      ]
    },
    {
      path: '/lunbo',
      name: 'lunbo',
      component: lunbo
    },
    {
      path: '/vuedraggable',
      name: 'vuedraggable',
      component: vuedraggable
    },
    {
      path: '/paging',
      name: 'paging',
      component: paging
    },
  ]
})

console.log("router");
console.log(Router)